import pymysql

db_config = {
        'host':'127.0.0.1',
        'port':1314,
        'user': 'admin',
        'password': 'Root110qwe',
        'db': 'dcrm',
        'charset': 'utf8',
    }
conn = pymysql.connect(**db_config)
cur = conn.cursor()
def connect_mysql_sql(cur,conn,sql_2,moshi='select'): #连接MySQL
    cur.execute(sql_2)
    conn.commit()
    if moshi == 'select':
        tuple_rcs = cur.fetchone()
        return tuple_rcs
    cur.close()
    conn.close()
sql = '''
INSERT INTO tb_tag(id,name, create_time, update_time, is_delete) values
(1,'Python基础', now(), now(), 0),
(2,'Python高级', now(), now(), 0),
(3,'Python函数', now(), now(), 0),
(4,'PythonGUI', now(), now(), 0),
(5,'Linux教程', now(), now(), 0),
(6,'Python框架', now(), now(), 0);
'''
sql2 = 'update tb_user set phone=18586186422 where phone=18586186425;'
sql3 = "insert into auth_permission values(23,'Can delete 用户',6,'delete_user');"
connect_mysql_sql(cur,conn,sql3,'insert')
print(400*24)